package com.wilson.staservice;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;


@SpringBootApplication
//@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)//取消数据源自动配置,配置文件中没有数据库
@EnableDiscoveryClient //服务发现功能，nacos注册，在客户端微服务启动类中添加注解
@EnableFeignClients//服务调用openfeign，在“调用端”的启动类添加注解,被调用端不用添加此注解
@ComponentScan(basePackages = {"com.wilson"})
@MapperScan("com.wilson.staservice.mapper")
@EnableScheduling //开启定时任务,创建定时任务类，使用cron表达式
public class StaApplication {
    public static void main(String[] args) {
        SpringApplication.run(StaApplication.class, args);
    }
}